using System;
using System.Data;
using System.Collections;

namespace APP.QUANLY.Entity
{
     /// <summary>
     /// Summary description for KHACHHANGKHUVUC.
     /// </summary>
     public class KHACHHANGKHUVUC
    {
              private Int32 _MAKHUVUC;
      private string _TEN;
      private Int32 _QUANGDUONG;
      private string _GHICHU;
      private bool _ISUSE;
      private KHACHHANGList _listKHACHHANG;
        private bool isExisting;
        #region Properties
        public bool IsExisting
        {
              get{return isExisting;}
              set{isExisting = value;}
        }
		      public bool IsMAKHUVUCNullable
      { get { return false;  } }
      public Int32 MAKHUVUC
      {
         get { return _MAKHUVUC; }
         set { _MAKHUVUC = value; }
      }
      public bool IsTENNullable
      { get { return true;  } }
      public string TEN
      {
         get { return _TEN;  }
         set { _TEN = value; }
      }
      public bool IsQUANGDUONGNullable
      { get { return true;  } }
      public Int32 QUANGDUONG
      {
         get { return _QUANGDUONG;  }
         set { _QUANGDUONG = value; }
      }
      public bool IsGHICHUNullable
      { get { return true;  } }
      public string GHICHU
      {
         get { return _GHICHU;  }
         set { _GHICHU = value; }
      }
      public bool IsISUSENullable
      { get { return true;  } }
      public bool ISUSE
      {
         get { return _ISUSE;  }
         set { _ISUSE = value; }
      }
public KHACHHANGList KHACHHANGList 
{ 
	get { return _listKHACHHANG; }
	set { _listKHACHHANG = value;}
}

        #endregion

        #region Constructors
        public KHACHHANGKHUVUC()
        {
            Reset();
        }
        public KHACHHANGKHUVUC(KHACHHANGKHUVUC obj)
        {
            	this._MAKHUVUC = obj.MAKHUVUC;
	this._TEN = obj.TEN;
	this._QUANGDUONG = obj.QUANGDUONG;
	this._GHICHU = obj.GHICHU;
	this._ISUSE = obj.ISUSE;
        }
        #endregion

        public void Reset()
        {
                     _MAKHUVUC = EmptyValues.v_Int32;
         _TEN = EmptyValues.v_string;
         _QUANGDUONG = EmptyValues.v_Int32;
         _GHICHU = EmptyValues.v_string;
         _ISUSE = EmptyValues.v_bool;
	_listKHACHHANG = null;
        }

         
        #region Hidden

        /*
        private void readProperties(IDataReader reader)
        {
            try
            {
                                if(!(reader["MAKHUVUC"] is DBNull))
		{
			obj.MAKHUVUC = (Int32)reader["MAKHUVUC"];
		}
                if(!(reader["TEN"] is DBNull))
		{
			obj.TEN = (string)reader["TEN"];
		}
                if(!(reader["QUANGDUONG"] is DBNull))
		{
			obj.QUANGDUONG = (Int32)reader["QUANGDUONG"];
		}
                if(!(reader["GHICHU"] is DBNull))
		{
			obj.GHICHU = (string)reader["GHICHU"];
		}
                if(!(reader["ISUSE"] is DBNull))
		{
			obj.ISUSE = (bool)reader["ISUSE"];
		}
//            _MAKHUVUC = (reader["MAKHUVUC"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["MAKHUVUC"];
//            _TEN = (reader["TEN"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["TEN"];
//            _QUANGDUONG = (reader["QUANGDUONG"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["QUANGDUONG"];
//            _GHICHU = (reader["GHICHU"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["GHICHU"];
//            _ISUSE = (reader["ISUSE"] is DBNull)?DalTools.EmptyValues.v_bool:(bool)reader["ISUSE"];
            }
            catch (Exception ex)
            {
                throw new DalException("Failed to read properties from DataReader.", ex);
            }
        } 
        */

        #endregion


        public void Fill(Int32 MAKHUVUC, string TEN, Int32 QUANGDUONG, string GHICHU, bool ISUSE)
        {
                     this._MAKHUVUC = MAKHUVUC;
         this._TEN = TEN;
         this._QUANGDUONG = QUANGDUONG;
         this._GHICHU = GHICHU;
         this._ISUSE = ISUSE;
        }
    }
}